<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript" src="${staticWebsite}js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
var endUrl = "${navUrlEnd}";
var url = "${navUrl}";
var currentPage = "${currentPage}";

$(document).ready(function() {
	//分页
	$("#pagebutton").click(function(){
			var pageNo = $("#pagenumber").val();
			var url1 = url+ "?" + currentPage + "=" + pageNo + endUrl;
			location.href=url1;
	});
});

</script>
<!--分页-->
<table cellspacing="0">
<tbody>
<tr>
<c:if test="${page.recordCount > page.pageSize}">
		<c:if test="${page.currentPage > 1}">
			<td>
			<a href="${navUrl}?${currentPage}=${page.firstPage}${navUrlEnd}">
			<img class="paging_img" src="${staticWebsite}image/page/home_page_color.jpg" border="0">
			</a>
			</td>
			<td>
			<a href="${navUrl}?${currentPage}=${page.prevPage}${navUrlEnd}">
			<img class="paging_img" src="${staticWebsite}image/page/previous_page_color.jpg" border="0">
			</a>
			</td>
		</c:if>
		<c:if test="${page.currentPage == 1}">
		<td>
			<a href="#">
			<img class="paging_img" src="${staticWebsite}image/page/home_page_gray.jpg" border="0">
			</a>
			</td>
			<td>
			<a href="#">
			<img class="paging_img" src="${staticWebsite}image/page/previous_page_gray.jpg" border="0">
			</a>
			</td>
		</c:if>
		
		<td>
			   <div class="div_pages_left"></div>
			   <div class="div_pages_center">
		<c:forEach items="${page.pageList}" var="pageNum">
			<c:choose>
			<c:when test="${pageNum == page.currentPage}">
			   	
			   
			   <a class="curPage">${pageNum}</a>
			  
			</c:when>
			<c:otherwise>
				
			   	<a href="${navUrl}?${currentPage}=${pageNum}${navUrlEnd}">
			   		${pageNum}
			   	</a>
			   	
			</c:otherwise>
			</c:choose>
		</c:forEach>
		</div> 
		<div class="div_pages_right"></div>
		</td>
		
		
		<c:if test="${page.currentPage < page.pageCount}">
			<td>
			<a href="${navUrl}?${currentPage}=${page.nextPage}${navUrlEnd}">
			<img class="paging_img" src="${staticWebsite}image/page/next_page_color.jpg" border="0">
			</a>
			</td>
			<td>
			<a href="${navUrl}?${currentPage}=${page.pageCount}${navUrlEnd}">
			<img class="paging_img" src="${staticWebsite}image/page/last_page_color.jpg" border="0">
			</a>
			</td>
		</c:if>
		
		<c:if test="${page.currentPage == page.pageCount }">
			<td>
			<a href="#">
			<img class="paging_img" src="${staticWebsite}image/page/next_page_gray.jpg" border="0">
			</a>
			</td>
			<td>
			<a href="#">
			<img class="paging_img" src="${staticWebsite}image/page/last_page_gray.jpg" border="0">
			</a>
			</td>
		</c:if>
	<td>
	当前第${page.currentPage}/${page.pageCount}页
	</td>
	
	<td>
	<input id="pagenumber" type="text" value="${page.currentPage}" size="3" />
	</td>
	
	<td>
	<input id="pagebutton" type="button" value="go" />
	</td>
</c:if>
</tr>
</tbody>
</table>
<!--分页结束-->
